package com.qys.livesMall.app.user.model.vo.app;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.qys.livesMall.app.user.model.enums.UserGenderEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * Created by IntelliJ IDEA.
 * User: dp
 * Date: 2023/04/26
 * Time: 14:55
 * DESCRIPTION: 用户信息vo
 */
@Data
public class AppUserInfoVo implements Serializable {
    static final long serialVersionUID = 42L;

    @Schema(description = "ID")
    private String id;

    @Schema(description = "用户名称")
    private String userName;

    @Schema(description = "昵称")
    private String nickName;

    @Schema(description = "店铺id")
    private Long shopId;

    @Schema(description = "余额")
    private BigDecimal balance;

    @Schema(description = "商店账户")
    private BigDecimal storeBalance;

    @Schema(description = "年龄")
    private Byte age;

    @Schema(description = "性别")
    private UserGenderEnum gender;

    public void setGender(Integer gender) {
        this.gender = gender == null ? null : UserGenderEnum.getEnum(gender);
    }

    @Schema(description = "个人介绍")
    private String personalIntroduction;

    @Schema(description = "头像")
    private String avatar;

    @Schema(description = "点赞")
    private long like;

    @Schema(description = "关注")
    private long concern;

    @Schema(description = "粉丝")
    private Integer fans;

    @Schema(description = "互关")
    private Integer interconnection;

    @Schema(description = "邀请码")
    private String invitationCode;

    @Schema(description = "用户显示Id（用户账号）注意在用户信息中被用为主播了")
    private String userRandomId;

    @Schema(description = "真实用户显示Id（用户账号）")
    private String newUserRandomId;

    @Schema(description = "用户类型")
    private Integer userType;

    @Schema(description = "生日")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+0")
    private LocalDate birthday;

    @Schema(description = "地址")
    private String address;

    @Schema(description = "等级")
    private Integer level;

    @Schema(description = "用户等级")
    private String userLevel;

    @Schema(description = "等级图标")
    private String userLevelIcon;

    @Schema(description = "余额")
    private BigDecimal goldBalance;

    @Schema(description = "邮箱")
    private String email;

    @Schema(description = "电话")
    private String mobile;

    @Schema(description = "送出礼物")
    private BigDecimal givingGifts;

    @Schema(description = "直播用户等级")
    private String liveStreamingLevel;
}
